import qs from 'qs';
import ajax from '@/utils/ajax/index';
import authService from '@/services/user/auth';
import config from '@/config';
import handleCatch from '@/api/handleCatch';

export default {
  appointmentTransferByToken(data) {
    return authService.getToken().then((token) => {
      return ajax.post(config.ajaxApi+'/user/wallet/appointment/transfer?token='+token, qs.stringify(data))
        .then((res) => res.data)
        .catch(handleCatch);
    });
  }
};
